package org.example.controller.shanjia;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.example.entity.Dds;
import org.example.entity.Sjtj;
import org.example.entity.Tq;
import org.example.result.Result;
import org.example.service.DingdanService;
import org.example.vo.DingdanVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/shanjia/gzt")
@Slf4j
@Api(tags = "工作台相关接口")
public class GlgongzuotaiController {

    @Autowired
    DingdanService dingdanService;


    /**
     * 数据统计查询
     * @param username
     * @return
     */
    @GetMapping("/tjcx")
    @ApiOperation(value = "数据统计查询")
    public Result<Sjtj> sjtjcx(@RequestParam( "username") String username){

        return Result.success(dingdanService.tjcx(username));
    }


    /**
     * 订单数查询
     * @param username
     * @return
     */
    @GetMapping("/ddscx")
    @ApiOperation(value = "订单数查询")
    public Result<Dds> ddscx(@RequestParam( "username") String username){

        return Result.success(dingdanService.ddscx(username));
    }


    /**
     * 停启查询
     * @param username
     * @return
     */
    @GetMapping("/tqcx")
    @ApiOperation(value = "停启查询")
    public Result<Tq> tqcx(@RequestParam( "username") String username){

        return Result.success(dingdanService.tqcx(username));
    }
}
